package cn.stylefeng.guns.modular.api.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@SuppressWarnings("rawtypes")
@ApiModel
public class FriendlyLinkDTO implements Comparable{

	public FriendlyLinkDTO(String title, String picUrl, String linkUrl, Integer pri) {
		this.title = title;
		this.picUrl = picUrl;
		this.linkUrl = linkUrl;
		this.pri = pri;
	}
	
	@ApiModelProperty("标题")
	private String title;
	@ApiModelProperty("图片地址")
	private String picUrl;
	@ApiModelProperty("点击跳转地址")
	private String linkUrl;
	@ApiModelProperty("排序号")
	private Integer pri;
	
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getPicUrl() {
		return picUrl;
	}

	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}

	public String getLinkUrl() {
		return linkUrl;
	}
	
	public void setLinkUrl(String linkUrl) {
		this.linkUrl = linkUrl;
	}

	public Integer getPri() {
		return pri;
	}

	public void setPri(Integer pri) {
		this.pri = pri;
	}

	@Override
	public int compareTo(Object o) {
		if(o instanceof FriendlyLinkDTO){
			FriendlyLinkDTO emp = (FriendlyLinkDTO) o;
			return this.pri.compareTo(emp.pri);
        }
		return 0;
	}
	
}
